home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
lists
/
gem
/
l_0799
/
729
< prev
next >
Wrap
Internet Message Format
|
1994-08-27
|
9KB
Date: Sat, 9 Jul 1994 09:08:20 -0400 (EDT)
Date: Fri, 8 Jul 94 23:17:45 EDT
Subject: Gem List (fwd) from goemon
Subject: Gem List
Subject: RE: Gem Listing (fwd)
Subject: Re: Gem Listing (fwd)
Subject: RE: Gem Listing (fwd)
Date: Sat, 9 Jul 1994 09:08:20 -0400 (EDT)
Mime-Version: 1.0
Precedence: bulk
Forwarded message:
>From goemon@venice.mps.ohio-state.edu Fri Jul 8 23:17:53 1994
From: Goemon <goemon@venice.mps.ohio-state.edu>
Message-Id: <9407090317.AA11185@venice.mps.ohio-state.edu>
Subject: Gem List
To: gem-list-approval@world.std.com
Date: Fri, 8 Jul 94 23:17:45 EDT
TO: gem-list@world.std.com
Subject: RE: Gem Listing (fwd)
David:
------
> No, the point is that using the mouse events (in/out of
> rectangles) is pretty difficult. Your code [sorry, this system
> doesn't support quoting] is a busy loop which was what we were
> trying to get away from.
Busy looping? What do you call a "do { } while" ??? THAT'S a busy loop
if I ever SAW one!
> I'd appreciate it if someone could
> post a code fragment using rectangle events, I agree it shouldn't be too
> difficult just that I've never had chance to try!
Trust me, it's more difficult than what I posted, and it takes more time to
use. Why not just TRY my code out and see for yourself? Speed difference
is almost NIL.
> and I need to trigger an event as the mouse passes into or out of the inner
> rectangle.
Refer to programmers' manuals... I know that MU_M1 and MU_M2 provide these,
but since I never use this, I don't know.
-Ken Hollis
-----
Subject: Re: Gem Listing (fwd)
Warwick:
--------
> Ken, I agree, that way is very easy to code. The problem is whether it
> is of sufficiently low cost to impose it as a standard for applications
> to follow.
I don't quite understand what you mean by saying "low cost". It's just about
four lines of code that is easy to do. It takes almost no time, because,
it checks the object under the mouse. Here's something that does almost
EXACTLY the same thing as rectangle events:
/* Program start */
/* Assume all variables are known by their names. Pretty easy to understand,
or so I would hope. */
last_edit = 0;
do {
/* Do your event loop thingie here */
object = objc_find(tree, mouse_x, mouse_y);
if ((last_edit != object) && (object != -1)) {
last_edit = object;
if (tree[last_edit].ob_flags & EDITABLE)
graf_mouse(TEXT_CRSR, 0L);
else
graf_mouse(ARROW, 0L);
}
} while(!(exitobject));
( THIS IS EVEN FASTER THAN THE FIRST IDEA )
The ONLY way you can find out which object is under the mouse is by using
objc_find. There is absolutely no other way to get rectangles under the
mouse without having to SAVE the physical dimensions of the rectangles,
storing those in an array, and checking the array every time the mouse
moves. That's slower, and I think that's what SOME of you are trying to get
at. This is the FASTEST idea I can think of off the top of my head. Bench-
marking may prove faster.
>(1) is easy to code (thank you Ken), but an inefficient use of
> events, as if 5 multitasking programs do this, then for
> every motion of the mouse, each of those programs will
> be woken up and each will call objc_find. In many cases,
> the objc_find will be very short, but it is still a system
> call for each application for every motion of the mouse.
Warwick, I don't think you understood me. The only time the mouse will be
checked is if the program is topped, or background activated. It will not
check the mouse otherwise.
If it's more difficult to code, why not use the method I explained earlier?
Even E_GEM does this!
> But if all GEM libraries are the same, why would you change from one to
> another? GEM++ for example doesn't even use the Extended Object Types
> byte. It uses full parameterized object instantiations presribed in
> the code, allowing any number of different types of object from sliders
> to scrolling self-drawing objects.
That's the problem. Not all GEM libraries are the same. Why not use
Extended Object Types? They add functionality and make the resources look
better. That's the reason EObT's are there.
> What do you think Drag And Drop is for? Exactly what sorts of messages
> do you have in mind? If I write a pair of apps that send each other messages,
> they can use whatever protocol I want, as it is not a shared resource.
You're forgetting that Drag-and-drop is an application message! AP_DRAGDROP
is the name... Did you forget, or did that just pass your mind?
> For broadcast messages, you have a point, but collecting non-broadcast
> message types is of no relevance. How many new broadcast message types
> currently exist? 0?
It's nice to follow some standards. If you want to code for non-broadcast,
that's your choice. Most of us like to follow a list so they can find out
if they can create WM or WF messages as they wish, without clashing with
other messages.
> Not at all. XBRA doesn't reply on some central list of unique identifiers.
> It relies on programs following a fixed standard.
*NOT AT ALL* If two programs use the same XBRA identifier for chaining into
a vector (which is entirely likely), bad things *WILL HAPPEN*. Either the
program would assume it's already installed into the vector (which would not
be the case) or if it tried to unchain from the XBRA chain, it could unchain
the *WRONG PROGRAM*. That's why the XBRA list exists, to make sure things
like this don't happen.
The cookie jar is another place where clashes can happen. Of course, you'll
probably say a master cookie list isn't needed either. :-)
Of course, if you actually wrote vector sharing programs, you would
understand this.
-Ken Hollis
-----------
Subject: RE: Gem Listing (fwd)
> Who said it was difficult? We're not talking about difficulty. We were
> talking about system overhead and wasted time.
>
> What's difficult is making a larger-than-1-pixel rectangle so that your
> app doesn't have to be called for every mouse movement, and system time
> doesn't have to be wasted.
The only time this will happen is when the application is topped. If it's
not topped, then a click in one of the windows will send an event to
the app to "wake up".
Even so, the overhead is *miniscule*. I've got it in my head to write a
benchmark program to compare overheads of different methods, and put this
argument to rest permanently.
-Ken Hollis
----------
> [...]
> fruitless (since it is a never ending argument). Geneva was specifically
> designed to meet a set of requirements (small size, excellent user
> performance, older application compatibility) which are very different
> than the design specs for MagiC.
Small? 250kb (or so) for GEM patches only, isn't so small.
192k for a entire ROMable OS is small. :-)
Older application compatibility? Ok, here Geneva does fine. However, who
actually wants to run old badly written programs? :-)
Also, I take exception to the "excellent user performance" bit. :-)
I think that anyone who has taken a look at the internals of Geneva will
be UNimpressed. On the surface it appears nice, but once you start digging
into its internals, you realize that it's actually quite a hack.
When a friend and I were digging around with Geneva a couple months ago, this
is what we found:
You run one application under Geneva, everything is cool.
You run two applications under Geneva, and something interesting happens:
The second application is actually running "under" the first application, at
this point they are sharing 50% of the CPU.
Envision the application tree like this:
GEM
|
v
Application 1
|
v
Application 2
Now start up a third application.
The third application also runs "under" the first application, and something
interesting happens again: The first application gets 50% CPU, and the
other two get 25% each (regardless of who happens to be "topped").
The application tree now looks like this:
GEM
|
v
.-- Application 1 --.
| |
v